{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.animation as anim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbsAAAGiCAYAAAB+sGhNAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAd60lEQVR4nO3de2zV9f3H8dcp0FPJOAcZ9IblJgoK2HKnuECNnRUJs8viEJ0gAZwLLGCJji6bTFxs/Clq4tiQGCUTCegQ2NDBahEIUkEKzQAZE2SArKeowDlQXbmcz++PZWertEhLv+e07z4fyUl2vv18v+f9tTs+Pbcen3POCQAAw5ISPQAAAF4jdgAA84gdAMA8YgcAMI/YAQDMI3YAAPOIHQDAPGIHADCP2AEAzCN2AADzPIvdyZMndf/99ysQCKhz586aNm2azp49e9l98vLy5PP56lwefvhhr0YEALQRPq/+Nua4ceNUVVWll156SefPn9fUqVM1fPhwLV++vMF98vLydOONN2rBggWxbR07dlQgEPBiRABAG9Hei4Pu379f69ev14cffqhhw4ZJkl588UXdddddevbZZ5WZmdngvh07dlR6eroXYwEA2ihPYldeXq7OnTvHQidJ+fn5SkpK0vbt2/X973+/wX1ff/11LVu2TOnp6ZowYYJ++ctfqmPHjg2ur62tVW1tbex6NBrVyZMn9e1vf1s+n695TggAEDfOOZ05c0aZmZlKSmqeV9s8iV0oFFJqamrdG2rfXl26dFEoFGpwv/vuu089e/ZUZmam/vrXv+pnP/uZDhw4oLfeeqvBfUpKSvTEE0802+wAgJbh2LFjuu6665rlWI2K3bx58/T0009fds3+/fubPMxDDz0U+9+DBg1SRkaGbr/9dh06dEjXX399vfsUFxerqKgodj0cDqtHjx76ju5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au3fvZUMnSbm5ucrNzY1dHz16tG666Sa99NJLevLJJy9Z7/f75ff7L9keDAbb1P85/iMQCLS5826L5yxx3m1JWzxnSUpKar63lcQldrNmzdK6deu0ZcuWeh+dXU6HDh00ePBgHTx40KPpAADWefpuTOecZs2apdWrV2vjxo3q3bt3o49x8eJF7dmzRxkZGR5MCABoCzx9ZDdz5kwtX75ca9euVadOnRQKhST9+ynGa665RpI0efJkde/eXSUlJZKkBQsWaNSoUerbt69Onz6tZ555RkeOHNH06dOv6Db9fr/mz59f71OblrXF826L5yxx3m3pvNviOUvenLenb1Dx+Xz1bn/11Vf14IMPSpLy8vLUq1cvLV26VJL0yCOP6K233lIoFNK1116roUOH6te//rUGDx7s1ZgAAOPi9m5MAAAShb+NCQAwj9gBAMwjdgAA84gdAMA8E7E7efKk7r//fgUCAXXu3FnTpk3T2bNnL7tPXl7eJV8l9PDDD8dp4qZZtGiRevXqpZSUFI0cOVI7duy47Po333xT/fv3V0pKigYNGqR33ml9fy+0Meds5euhtmzZogkTJigzM1M+n09r1qz5xn02bdqkIUOGyO/3q2/fvrF3N7cWjT3nTZs2XfK79vl8sY83tQZN+Qo0qfXfrxP11W8mYnf//fdr3759Ki0tjf2lloceeugb95sxY0adrxL6v//7vzhM2zQrV65UUVGR5s+fr127dik7O1sFBQU6ceJEveu3bdumSZMmadq0adq9e7cKCwtVWFiovXv3xnnypmvsOUs2vh6qpqZG2dnZWrRo0RWtP3z4sMaPH6/bbrtNlZWVmjNnjqZPn64NGzZ4PGnzaew5/8eBAwfq/L5TU1M9mrD5NeUr0CzcrxP21W+ulfvoo4+cJPfhhx/Gtv35z392Pp/PHT9+vMH9xo4d62bPnh2HCZvHiBEj3MyZM2PXL1686DIzM11JSUm963/4wx+68ePH19k2cuRI9+Mf/9jTOZtTY8/51VdfdcFgME7TxYckt3r16suueeyxx9yAAQPqbJs4caIrKCjwcDLvXMk5v/fee06SO3XqVFxmiocTJ044SW7z5s0NrrFwv/66Kznv5rhvt/pHduXl5ercubOGDRsW25afn6+kpCRt3779svu+/vrr6tq1qwYOHKji4mJ9+eWXXo/bJOfOnVNFRYXy8/Nj25KSkpSfn6/y8vJ69ykvL6+zXpIKCgoaXN/SNOWcpf9+PVRWVpbuvvtu7du3Lx7jJlRr/11fjZycHGVkZOi73/2u3n///USPc1Wu5CvQLP6uG/vVb029b7f62IVCoUueumjfvr26dOly2efv77vvPi1btkzvvfeeiouL9dprr+lHP/qR1+M2yeeff66LFy8qLS2tzva0tLQGzzEUCjVqfUvTlHPu16+fXnnlFa1du1bLli1TNBrV6NGj9emnn8Zj5IRp6HcdiUT01VdfJWgqb2VkZGjx4sVatWqVVq1apaysLOXl5WnXrl2JHq1JotGo5syZo1tvvVUDBw5scF1rv19/3ZWed3Pct+P65a2NMW/ePD399NOXXbN///4mH/9/X9MbNGiQMjIydPvtt+vQoUO6/vrrm3xcJE5jvx4KrVe/fv3Ur1+/2PXRo0fr0KFDev755/Xaa68lcLKmudKvQLPGq69+q0+Ljd3cuXNjfz+zIX369FF6evolb1i4cOGCTp48qfT09Cu+vZEjR0qSDh482OJi17VrV7Vr107V1dV1tldXVzd4junp6Y1a39I05Zy/rq18PVRDv+tAIBD7g+ttwYgRI1plLBrzFWit/X79v+L91W8t9mnMbt26qX///pe9JCcnKzc3V6dPn1ZFRUVs340bNyoajcYCdiUqKyslqUV+lVBycrKGDh2qsrKy2LZoNKqysrI6/7Xzv3Jzc+usl6TS0tIG17c0TTnnr2srXw/V2n/XzaWysrJV/a5dE74CzcLvuinn/XVNum9f1dtbWog777zTDR482G3fvt1t3brV3XDDDW7SpEmxn3/66aeuX79+bvv27c455w4ePOgWLFjgdu7c6Q4fPuzWrl3r+vTp48aMGZOoU/hGK1ascH6/3y1dutR99NFH7qGHHnKdO3d2oVDIOefcAw884ObNmxdb//7777v27du7Z5991u3fv9/Nnz/fdejQwe3ZsydRp9BojT3nJ554wm3YsMEdOnTIVVRUuHvvvdelpKS4ffv2JeoUmuTMmTNu9+7dbvfu3U6Se+6559zu3bvdkSNHnHPOzZs3zz3wwAOx9Z988onr2LGje/TRR93+/fvdokWLXLt27dz69esTdQqN1thzfv75592aNWvcxx9/7Pbs2eNmz57tkpKS3LvvvpuoU2i0n/zkJy4YDLpNmza5qqqq2OXLL7+MrbF4v27KeTfHfdtE7L744gs3adIk961vfcsFAgE3depUd+bMmdjPDx8+7CS59957zznn3NGjR92YMWNcly5dnN/vd3379nWPPvqoC4fDCTqDK/Piiy+6Hj16uOTkZDdixAj3wQcfxH42duxYN2XKlDrr33jjDXfjjTe65ORkN2DAAPf222/HeeKr15hznjNnTmxtWlqau+uuu9yuXbsSMPXV+c/b6r9++c+5TpkyxY0dO/aSfXJyclxycrLr06ePe/XVV+M+99Vo7Dk//fTT7vrrr3cpKSmuS5cuLi8vz23cuDExwzdRfecrqc7vzuL9uinn3Rz3bb7iBwBgXot9zQ4AgOZC7AAA5hE7AIB5xA4AYB6xAwCYR+wAAOYROwCAecQOAGAesQMAmEfsAADmETsAgHn/D0j53WT4EpeqAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.array([[0, 0, 255], [255, 255, 0], [0, 255, 0]])\n",
    "plt.imshow(x, interpolation='nearest')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[255, 255, 255, 255],\n",
       "       [  0, 255, 255, 255],\n",
       "       [255, 255, 255,   0],\n",
       "       [255, 255, 255, 255]])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.random.choice([0, 255], 4 * 4, p=[0.1, 0.9]).reshape(4, 4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def addGlider(i, j, grid):\n",
    "    glider = np.array([[0, 0, 255], [255, 0, 255], [0, 255, 255]])\n",
    "    grid[i : i + 3, j : j + 3] = glider\n",
    "\n",
    "\n",
    "N = 10\n",
    "grid = np.zeros(N * N).reshape(N, N)\n",
    "addGlider(1, 1, grid)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
